<template>
  <h1>学生姓名:{{ name }}</h1>
  <h1>学生班级:{{ classname }}</h1>
</template>

<script>
import {ref, onBeforeMount, onMounted, onBeforeUpdate, onUpdated, inject, toRefs} from "vue";

export default {
  name: "User",
  props: [],
  setup(props,content) {
    const student = inject('student')
    return {...student}
  }
}
</script>

<style scoped>
.d1{
  color: blue;
}
</style>